﻿using System;
using System.CodeDom.Compiler;
using System.Reflection;
using AutoR.Services;
using AutoR.ViewModels.Home;
using AutoR.ViewModels.Setting;
using AutoR.ViewModels.Tasks;
using AutoR.Views;
using AutoR.Views.Home;
using AutoR.Views.Setting;
using AutoR.Views.Tasks;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;
using Plugin.Iconize;
using Plugin.Iconize.Fonts;
using Prism;
using Prism.Ioc;
using Prism.Unity;
using Syncfusion.Licensing;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml;
using Xamarin.Forms.Xaml.Internals;

namespace AutoR
{
	// Token: 0x02000009 RID: 9
	[XamlFilePath("App.xaml")]
	public class App : PrismApplication
	{
		// Token: 0x0600003E RID: 62 RVA: 0x00003298 File Offset: 0x00001498
		public App() : this(null)
		{
		}

		// Token: 0x0600003F RID: 63 RVA: 0x000032A1 File Offset: 0x000014A1
		public App(IPlatformInitializer initializer) : base(initializer)
		{
			SyncfusionLicenseProvider.RegisterLicense("MjU3NTdAMzEzNjJlMzMyZTMwZ1RBZjVlZWswd3pYc0ZzOU8zTVp0T212aTFscDlMcWpLWXNxRDlORmUwQT0=");
			Iconize.With(new MaterialModule());
		}

		// Token: 0x06000040 RID: 64 RVA: 0x000032BF File Offset: 0x000014BF
		protected override void OnStart()
		{
			AppCenter.Start("android=9a824180-90e7-41dc-9b2b-d6eda7c90f35;ios=76ef21c3-9b4c-43e6-bbb9-e709d0e3bcd9", new Type[]
			{
				typeof(Analytics),
				typeof(Crashes)
			});
		}

		// Token: 0x06000041 RID: 65 RVA: 0x000032EC File Offset: 0x000014EC
		protected override async void OnInitialized()
		{
			this.InitializeComponent();
			await base.NavigationService.NavigateAsync(Runtime.Game.IsLogin ? "Navigation/Main" : "/Login");
		}

		// Token: 0x06000042 RID: 66 RVA: 0x00003328 File Offset: 0x00001528
		protected override void RegisterTypes(IContainerRegistry containerRegistry)
		{
			containerRegistry.RegisterForNavigation("Navigation");
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
			containerRegistry.RegisterForNavigation(null);
		}

		// Token: 0x06000043 RID: 67 RVA: 0x000033F0 File Offset: 0x000015F0
		[GeneratedCode("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
		private void InitializeComponent()
		{
			if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(App).GetTypeInfo().Assembly.GetName(), "App.xaml") != null)
			{
				this.__InitComponentRuntime();
				return;
			}
			if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
			{
				this.__InitComponentRuntime();
				return;
			}
			NameScope value = new NameScope();
			NameScope.SetNameScope(this, value);
		}

		// Token: 0x06000044 RID: 68 RVA: 0x00003467 File Offset: 0x00001667
		private void __InitComponentRuntime()
		{
			this.LoadFromXaml(typeof(App));
		}
	}
}
